package com.finance.model.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.Objects;

/**
 * @author 邓天天
 * @date 2021/6/18 23:44
 */
@Getter
@Setter
@ToString
@TableName(value = "股票记录")
public class 股票记录 extends BaseEntity{
    private String 股票编码;
    private BigDecimal 开盘价;
    private BigDecimal 收盘价;
    private BigDecimal 最高价;
    private BigDecimal 最低价;
    private BigDecimal 成交量;
    private BigDecimal 成交额;
    private BigDecimal 换手率;
    private BigDecimal 市净率;
    private BigDecimal 动态市盈率;
    private LocalDate 日期;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        股票记录 股票记录 = (股票记录) o;
        return this.股票编码.equals(股票记录.股票编码) && this.日期.equals(股票记录.日期);
    }

    @Override
    public int hashCode() {
        return Objects.hash(股票编码, 日期);
    }
}
